package com.tywj.buscustomerapp.presenter.contract;

import android.content.Context;

import com.tywj.buscustomerapp.model.bean.BuyedBean;
import com.tywj.buscustomerapp.model.bean.DateJoe;
import com.tywj.buscustomerapp.model.bean.RequestBean;
import com.tywj.buscustomerapp.model.bean.StationBean;
import com.tywj.buscustomerapp.model.bean.YuPiaoBean;
import com.tywj.buscustomerapp.presenter.BasePresenter;

import java.util.List;

public class BuyTicketContract {
    public interface BuyTicketModel {
        List<StationBean> loadStations(String stationId);
        String checkIsCanBuyTicket(String time,String lineId,String start,String end);
        String getCont(String time,String lineId,String start,String end);

        String getPiaoJia(String lineId, String start, String end);
        String doBuyTicketOnOnce(String phone, String lineNumber, String start, String end, String userStart,
                                 String userEnd, String busTime, String buyTIme, String price,
                                 String state, String city,String busNumber,String startTime,String endTime);

        String doCheckMonthTicket(String year, String month, String lineNumber, String start, String end);
        String doBuyMonthTicket(String phone, String lineNumber, String month, String year, String start, String end,
                                String startTime, String endTime);
        RequestBean doBuyOnceTicket(BuyTicketContract.BuyTicketView view,Context context, String yhm, String ch, String gmqsz, String gmzdz, List<String> ccsjs,
                                    String scsj, String xcsj,int number);
        RequestBean doBuyMonthTicket(BuyTicketContract.BuyTicketView view,Context context, String phone, String lineNumber, String month, String year, String start, String end,
                                     String startTime, String endTime);
        List<YuPiaoBean> getDays(String lineNum);
        List<BuyedBean> getBuyeds(String lineNum,String phone);

        String getMyDaysTicket(String phone);

    }

    /**
     * V层
     */
    public interface BuyTicketView {
        /**
         * 显示加载中
         */
        void showLoading();

        /**
         * 管理加载状态
         */
        void closeLoading();

        void loadError(String msg);

        /**
         * 展示信息
         */
        void loadedData(List<StationBean> s);

        void loadeIsCanBuyTicket(String isOk,DateJoe dateJoe,int pos);
        void loadeIsCanBuyTicket1(int isOk,DateJoe dateJoe,int pos,String count);

        void loadeBuyPrice(String price);
        void loadeIsBuySuccess(RequestBean requestBean);
        void loadBuyMonthSuccess(RequestBean requestBean);
        void loadDays(List<YuPiaoBean> beans);
        void getBuyeds(List<BuyedBean> beans);
    }

    /**
     * P层
     */
    public interface BuyTicketPresenter extends BasePresenter {
        /**
         * 开始获取数据
         *
         */
        void startLoadStations(String stationId);
        void startGetPrice(String lineId, String start, String end);
        void startCheckTicket(int pos,DateJoe time, String lineId, String start, String end);
        void startGetCont(int pos,DateJoe time, String lineId, String start, String end);

        void doBuyTicketOnOnce(Context context, String yhm, String ch, String gmqsz, String gmzdz,List<String> ccsjs,
                               String scsj, String xcsj,int number);
        void doBuyTicketOnMonth(Context context, String phone, String lineNumber, String month, String year, String start, String end,
                                String startTime, String endTime);
        void getDays(String lineNum);
        void getBuyeds(String lineNum,String phone);

    }
}
